﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
//
using System.Security.Cryptography;

namespace GestorDeFlotasDesktop
{
    public static class encryptor
    {
        public static string Encriptar(string clave)
        {
            SHA256Managed passwd = new SHA256Managed();
            byte[] texto = System.Text.Encoding.ASCII.GetBytes(clave);
            byte[] textocifrado = passwd.ComputeHash(texto);
            string password = Convert.ToBase64String(textocifrado);
            return password;
        }
    }
}
